# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=libraw1394
pkgver=2.1.2
pkgrel=2
pkgdesc="Library to provide access to Linux 1394 subsystem"
url="https://sourceforge.net/projects/libraw1394"
arch="all"
license="LGPL-2.1-or-later"
makedepends="linux-headers"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://kernel.org/pub/linux/libs/ieee1394/libraw1394-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	pkgdesc="Tools for libraw1394"
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}

sha512sums="1ef38961b747c4ebb18d823a4c38d5bf019f8bd0ac55547838d153b1899b91ae0ff56f5b6732e309d6975b55725d1ce989917ffcf605cf64f7d33624f54f0567  libraw1394-2.1.2.tar.xz"
